package com.zyf.chapter02.creation.singleton.refactor;


import java.io.IOException;

/**
 * 使用 Logger
 * @author yifeng
 */
public class Controller {
    public static class UserController {

        public void login(String username, String password) throws IOException {
            // .. 省略业务代码
            Logger.getInstance().log(username + " logined!");
        }
    }

    public static class OrderController {

        public void login(String order) throws IOException {
            // .. 省略业务代码
            Logger.getInstance().log("Created a order: " + order);
        }
    }
}
